<template>
	<view class="ruledetail">
		<ruledetail :type="type"></ruledetail>
	</view>
</template>

<script>
	import ruledetail from '@/components/rules/rules';
	import {
		rules
	} from '@/api/my/my.js';
	export default {
		components: {
			ruledetail,
		},
		data() {
			return {
				type: "", //协议类型
			}
		},
		onLoad(options) {
			this.type = options.type;
			this.getDataList();
		},
		methods: {
			// 列表
			getDataList() {
				rules('agreementList', {}).then(res => {
					let datas = res.data;
					uni.setNavigationBarTitle({
					　　title:datas[this.type]
					})
				}).catch(error => {
					uni.hideLoading();
				})
			},
		},
	}
</script>

<style lang="scss" scoped>

</style>
